﻿using System;
using Autodesk.Revit.UI;

namespace ModelChecking.ModelValidation.FireCompartment
{
	public class ModelessFromRequestHandler : IExternalEventHandler
	{
		public Request Request
		{
			get
			{
				return this.m_request;
			}
		}

		public void Execute(UIApplication app)
		{
			switch (this.Request.Take())
			{
			case RequestId.None:
				break;
			case RequestId.ReplaceFamilyInstance:
				ModelessFormApp.m_dlg.ReplaceFamilyInstance();
				return;
			case RequestId.CloseFireAreaWalls:
				ModelessFormApp.m_dlg.CloseFireAreaWalls();
				break;
			default:
				return;
			}
		}

		public string GetName()
		{
			return "ModelessFromRequestHandler for FireCompartment";
		}

		private Request m_request = new Request();
	}
}
